package com.jk.lzy.controller;

import com.jk.OrderBean;
import com.jk.TreeBean;
import com.jk.lzy.service.MovieSerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;

/**
 * @Author: 梁展艺
 * @Description: 控制层
 * @Date: 2021/5/19 16:31
 * @param null
 * @Return:
 **/
@Controller
@RequestMapping("lzyMovie")
public class MovieInfoController {
    // 注入 service层
    @Autowired
    private MovieSerService lzyMovieService;
    /**
     * @Author: 梁展艺
     * @Description:  查询 数据库 做echar 订单总金额
     * @Date: 2021/5/20 9:40
     * @param dateseven
     * @Return: java.util.List<com.jk.OrderBean>
     **/
    @RequestMapping("eCharByOrder")
    @ResponseBody
    public HashMap<String, Object> eCharByOrder(String [] dateseven){
        return lzyMovieService.eCharByOrder(dateseven);
    }
    /**
     * @Author: 梁展艺
     * @Description:  管理员 树页面
     * @Date: 2021/5/20 15:10
     * @Return: java.util.List<com.jk.TreeBean>
     **/
    @RequestMapping("findTreeRole")
    @ResponseBody
    public List<TreeBean> findTreeRole(){
        return lzyMovieService.findTreeRole();
    }
    /**
     * @Author: 梁展艺
     * @Description:  订单信息查询
     * @Date: 2021/5/20 16:08
     * @param
     * @Return: java.util.List<com.jk.OrderBean>
     **/
    @RequestMapping("findOrderBy")
    @ResponseBody
    public List<OrderBean> findOrderBy(OrderBean order){
        return lzyMovieService.findOrderBy(order);
    }
}
